package xyx.springboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import xyx.springboot.service.UserService;

@Controller //返回页面
@RequestMapping("/springboot")
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping(value = "/index",method = RequestMethod.GET)
    public String index (){
        String user = userService.selectUser(1).toString();
        System.out.print(user);
        return "index";
    }
}
